package com.flute.haflute.monitor;

import java.util.HashMap;
import java.util.Map;
import java.util.Observable;
import java.util.Observer;

import com.flute.haflute.jobbox.child.ChildContext;

/**
 * 接口监控者
 */
public class GeneralCenterObserver implements Observer {

	@Override
	public void update(Observable o, Object arg) {
		if (arg instanceof StatusMessage) {
			Map<String, StatusMessage> map = new HashMap<String, StatusMessage>();
			map.put(ChildContext.getMyID(), (StatusMessage) arg);
			MessageTransfer.localMsgSend("reportStatusMessage", map);
		}

	}

}
